<template>
	<ToolbarBottom
		v-if="position == 'bottom'"
		:items="items"
		@item-click="handleToolbarItemClick"
	></ToolbarBottom>
	<ToolbarTop
		v-else
		:position="position"
		:items="items"
		@item-click="handleToolbarItemClick"
	></ToolbarTop>
</template>
<script setup lang="ts">
import { toolbarProps } from './toolbar';
import ToolbarBottom from './components/toolbar-bottom.vue';
import ToolbarTop from './components/tootlbar-top.vue';
const props = defineProps(toolbarProps);
const emit = defineEmits<{
	(name: 'item-click', tag: any, event: any, logic: any): void;
}>();
const handleToolbarItemClick = (tag: string, event: any, logic: any) => {
	emit('item-click', tag, event, logic);
};
</script>
